exercises
Exercises#
- Write a JavaScript program to list the properties of a JavaScript object.
Sample object:
Sample Output:
- Write a JavaScript program to delete the
rollnoproperty from the following object. Also print the object before and after deleting the property.
Sample object:
Write a JavaScript program to get the length of a JavaScript object properties.
Write a JavaScript function to retrieve all the values of an object's properties. Sample object:
Sample Output:
Write a JavaScript function to check whether an object contains given property.
Write a JavaScript function to get a copy of the object where the keys have become the values and the values the keys.
Sample Object:
Sample Output